//
//  PhotoCollectionViewCell.m
//  BuyWhat
//
//  Created by 孟学浩 on 16/12/16.
//  Copyright © 2016年 吕金状. All rights reserved.
//

#import "PhotoCollectionViewCell.h"

@implementation PhotoCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        _imgView = [UIImageView new];
        _imgView.contentMode = UIViewContentModeScaleAspectFit;
        self.backgroundColor = [UIColor blackColor];
        [self.contentView addSubview:_imgView];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    _imgView.frame = self.bounds;
}

- (void)setImgUrl:(NSString *)imgUrl{
    _imgUrl = imgUrl;
    [_imgView sd_setImageWithURL:[NSURL URLWithString:_imgUrl] placeholderImage:[UIImage imageNamed:@"Beingloaded"]];
}

@end
